import service from '@/utils/request'
import { prefix } from '../common'
export const useUserInfoApi = () => {
	return service.get(prefix + '/sys/user/info')
}

export const useUserInfoSubmitApi = (dataForm: any) => {
	return service.put(prefix + '/sys/user/info', dataForm)
}

export const useUserAvatarApi = (dataForm: any) => {
	return service.put(prefix + '/sys/user/avatar', dataForm)
}

export const updatePasswordApi = (data: any) => {
	return service.put(prefix + '/sys/user/password', data)
}

export const useUserApi = (id: number) => {
	return service.get(prefix + '/sys/user?id=' + id)
}

export const useRealNameListApi = (idList: number[]) => {
	return service.post(prefix + '/sys/user/nameList', idList)
}

export const useUserSubmitApi = (dataForm: any) => {
	return service.post(prefix + '/sys/user', dataForm)
}

export const changePasswordApi = (data: any) => {
	return service.put(prefix + '/sys/user/changePassword', data)
}
